package com.flame.core.utils.cipher;

import java.nio.charset.StandardCharsets;

import org.springframework.util.DigestUtils;

/**
 * Md5Cipher
 *
 * @author wuxintong
 * @since 2023/1/28
 */
public class Md5Cipher implements FlameCipher {

    @Override
    public String encrypt(String data) {
        return DigestUtils.md5DigestAsHex(data.getBytes(StandardCharsets.UTF_8));
    }
}
